function sleep(second){
    return new Promise(resolve => {
    setTimeout(() => {
    console.log(Math.random());
    resolve();
    },second);
    });
}
// 串行执行
async function chuanXingDemo() {
  await sleep(1000);
  await sleep(1000);
  await sleep(1000);
}
// chuanXingDemo()
async function bingXingDemo() {
  let tasks = [];
  console.log(1111);
  for (let i = 0; i < 3; ++i) {
    tasks.push(sleep(1000));
  }
  await Promise.all(tasks);
}
bingXingDemo();
